package belf.migrate.api.exception;

import belf.migrate.api.table.schema.TablePath;
import belf.migrate.core.exception.BelfRuntimeException;

public class CreateTableException extends BelfRuntimeException {
    private static final String MSG = "Table %s does not exist in Catalog %s.";

    private String sql;
    public CreateTableException(String catalogName, TablePath tablePath) {
        this(catalogName, tablePath, null, null);
    }

    public CreateTableException(String catalogName, TablePath tablePath, Throwable cause, String sql) {
        super(
                APIErrorCode.TABLE_CREATE_FAILD,
                cause.getMessage(),
                cause);
        this.sql = sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }
}
